package com.masterclient.app.modules.shop.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.masterclient.app.R;
import com.masterclient.app.modules.shop.beans.StoreClassifyChildBean;

import java.util.List;


public class StoreClassifyGridAdapter extends BaseAdapter {

    private List<StoreClassifyChildBean> list;
    private Context context;

    public StoreClassifyGridAdapter(Context context, List<StoreClassifyChildBean> list) {
        this.context = context;
        this.list = list;
    }

    @Override
    public int getCount() {
        return list == null ? 0 : list.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        TextView tv = (TextView) View.inflate(context, R.layout.item_store_classify_child, null);
        tv.setText(list.get(position).getName());
        return tv;
    }
}
